package cn.sweet.listener;

import java.util.concurrent.ConcurrentHashMap;

/**
 * 文件状态
 *
 * @author wellhor Zhao
 * @version 1.0
 * @date 2021/12/8 7:15 PM
 **/
public class FileState {

    private final static ConcurrentHashMap<String, String> FILE_CHANGED_SET = new ConcurrentHashMap<>();

    public static boolean contain(String filePath) {
        return FILE_CHANGED_SET.containsKey(filePath);
    }

    public static void add(String filePath) {
        FILE_CHANGED_SET.put(filePath, "");
    }

    public static void remove(String filePath) {
        FILE_CHANGED_SET.remove(filePath);
    }
}
